<script type="text/javascript">
<#if errMsg?exists>
alert("${errMsg}");
</#if>

window.top.location.href="${contextPath}/login.jsp";
</script>